1. Field of the Invention
The present invention relates to techniques for smoothly transitioning between consecutive data streams. More specifically, the present invention relates to circuits and methods for providing zero-gap playback of consecutive data streams using predictive mixing.
2. Related Art
Portable electronic devices, such as media players, are becoming increasingly popular. These devices allow users to store and playback a variety of media files, such as audio files containing music. In order to enjoy a continuous stream of music, users typically queue multiple media files, such as those in a play list, for playback.
However, there are often ‘breaks’ or ‘gaps’ in this continuous stream at the beginnings and/or the endings of media files, which may degrade the overall user experience. For example, there is often a header and/or a trailer in a given audio file that does not include music. These headers and trailers may include a fixed time interval associated with a media application/encoder that was used to generate the given audio file (including any warm-up time and/or delays associated with the encoder), as well as a variable time interval associated with how the given audio file was generated (including factors such as the window size and the sampling rate). Moreover, the music in many songs progressively ramps up at the beginning and/or slowly ramps down at the end. These intervals effectively add to the headers and/or trailers and increase the size of the gaps between consecutive songs in a play list.
Since these gaps degrade the overall user experience, it is often advantageous to reduce or to eliminate them. For example, during radio broadcasts many disc jockeys routinely start a subsequent song prior to the end of the preceding song. This approach may be implemented in electronic devices using multiple decoders. For example, one decoder may decode an audio file associated with the current song and another decoder may decode an audio file associated with the subsequent song. By transitioning between the data streams output by these decoders, the gap during consecutive playback of these audio files may be reduced or eliminated. Alternatively, a single decoder may be used with a large memory or buffer, which can be used to simultaneously store decoded data streams for multiple audio files, thereby facilitating transitions between these audio files during playback.
However, it may be difficult to use these techniques in portable electronic devices. For example, due to the limited energy capacity of batteries, as well as cost constraints, many portable devices do not have multiple decoders and/or have a limited amount of memory. These limitations and constraints make it difficult to reduce or eliminate gaps during playback of consecutive audio files.
Hence what is needed is a method and an apparatus that facilitates playback of consecutive data streams without the above-described problems.